Option Explicit

Public Sub AddiereZweiZellen()

    Dim a As Double
    Dim b As Double
    
    a = Range("A1").Value
    b = Range("B1").Value
    
    Range("C1").Value = a + b

End Sub


Public Sub AddiereZweiZellen_Sicher()

    Dim v1 As Variant, v2 As Variant
    Dim a As Double, b As Double
    
    v1 = Range("A1").Value
    v2 = Range("B1").Value
    
    If Not IsNumeric(v1) Or Not IsNumeric(v2) Then
    
      MsgBox "Bitte in A1 und B1 Zahlen eingeben.", vbExclamation, "Ungültige Eingabe"
      Exit Sub
        
    End If
    
    a = CDbl(v1)
    b = CDbl(v2)
    
    Range("C1").Value = a + b

End Sub